// 1. 导入express
const express = require("express");

// 2 .创建服务器
const app = express();

app.use(function (req, res, next) {
  console.log("ok");
  next();
});

app.get("/user", (req, res) => {
  console.log("这是客户端访问/user");
});

// 3. 启动服务器

app.listen(8080, () => {
  console.log("http://127.0.0.1:8080");
});
